.TH "D:/FEUP/LCOM/WorkC/projecto/trunk/libepc.h" 3 "25 May 2010" "Colision" \" -*- nroff -*-
.ad l
.nh
.SH NAME
D:/FEUP/LCOM/WorkC/projecto/trunk/libepc.h \- 
.SH SYNOPSIS
.br
.PP
.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBROWCOL\fP"
.br
.ti -1c
.RI "struct \fBWINDOW\fP"
.br
.ti -1c
.RI "struct \fBQUEUE\fP"
.br
.in -1c
.SS "Defines"

.in +1c
.ti -1c
.RI "#define \fBLSB\fP(u)   ((u) & 0xFF)"
.br
.ti -1c
.RI "#define \fBMSB\fP(u)   ((u) >> 8)"
.br
.ti -1c
.RI "#define \fBENTRIES\fP(a)   (sizeof(a)/sizeof(a[0]))"
.br
.ti -1c
.RI "#define \fBPRIVATE\fP   static"
.br
.ti -1c
.RI "#define \fBNULL\fP   ((void *) 0)"
.br
.ti -1c
.RI "#define \fBPUSHCS\fP   __asm__ __volatile__ ('PUSHL %CS') ;"
.br
.ti -1c
.RI "#define \fBPUSHF\fP   __asm__ __volatile__ ('PUSHFL')"
.br
.ti -1c
.RI "#define \fBPOPF\fP   __asm__ __volatile__ ('POPFL')"
.br
.ti -1c
.RI "#define \fBSTI\fP   __asm__ __volatile__ ('STI')"
.br
.ti -1c
.RI "#define \fBCLI\fP   __asm__ __volatile__ ('CLI')"
.br
.ti -1c
.RI "#define \fBPUSHA\fP   __asm__ __volatile__ ('PUSHAL')"
.br
.ti -1c
.RI "#define \fBPOPA\fP   __asm__ __volatile__ ('POPAL')"
.br
.ti -1c
.RI "#define \fBENTER\fP   __asm__ __volatile__ ('ENTER $0,$0')"
.br
.ti -1c
.RI "#define \fBLEAVE\fP   __asm__ __volatile__ ('LEAVE')"
.br
.ti -1c
.RI "#define \fBIRET\fP   __asm__ __volatile__ ('IRET')"
.br
.ti -1c
.RI "#define \fBIRQ_TICK\fP   0"
.br
.ti -1c
.RI "#define \fBIRQ_KYBD\fP   1"
.br
.ti -1c
.RI "#define \fBIRQ_COM2_COM4\fP   3"
.br
.ti -1c
.RI "#define \fBIRQ_COM1_COM3\fP   4"
.br
.ti -1c
.RI "#define \fBIRQ_FLOPPY\fP   6"
.br
.ti -1c
.RI "#define \fBIRQ_PAR_PORT\fP   7"
.br
.ti -1c
.RI "#define \fBIRQ_RTC\fP   8"
.br
.ti -1c
.RI "#define \fBIRQ_PS2_MOUSE\fP   12"
.br
.ti -1c
.RI "#define \fBIRQ_HARD_DISK\fP   14"
.br
.ti -1c
.RI "#define \fBFIXED32_ONE\fP   65536L"
.br
.ti -1c
.RI "#define \fBFIXED32_PI\fP   205887L"
.br
.ti -1c
.RI "#define \fBFIXED32_2PI\fP   411775L"
.br
.ti -1c
.RI "#define \fBFIXED32_E\fP   178144L"
.br
.ti -1c
.RI "#define \fBFIXED32_ROOT2\fP   74804L"
.br
.ti -1c
.RI "#define \fBFIXED32_ROOT3\fP   113512L"
.br
.ti -1c
.RI "#define \fBFIXED32_GOLDEN\fP   106039L"
.br
.ti -1c
.RI "#define \fBFLOAT32\fP(x)   ((\fBFIXED32\fP) ((x) << 16))"
.br
.ti -1c
.RI "#define \fBTRUNC32\fP(x)   ((int) ((x) >> 16))"
.br
.ti -1c
.RI "#define \fBROUND32\fP(x)   ((int) (((x) + 0x8000) >> 16))"
.br
.in -1c
.SS "Typedefs"

.in +1c
.ti -1c
.RI "typedef int \fBBOOL\fP"
.br
.ti -1c
.RI "typedef unsigned char \fBBYTE8\fP"
.br
.ti -1c
.RI "typedef unsigned short int \fBWORD16\fP"
.br
.ti -1c
.RI "typedef unsigned long int \fBDWORD32\fP"
.br
.ti -1c
.RI "typedef unsigned long long int \fBQWORD64\fP"
.br
.ti -1c
.RI "typedef signed long int \fBFIXED32\fP"
.br
.ti -1c
.RI "typedef signed long long int \fBFIXED64\fP"
.br
.ti -1c
.RI "typedef void(* \fBISR\fP )(void)"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "void \fBoutportb\fP (\fBWORD16\fP, \fBBYTE8\fP)"
.br
.ti -1c
.RI "\fBBYTE8\fP \fBinportb\fP (\fBWORD16\fP)"
.br
.ti -1c
.RI "void \fBexit\fP (int)"
.br
.ti -1c
.RI "void * \fBLastMemoryAddress\fP (void)"
.br
.ti -1c
.RI "int \fBIRQ2INT\fP (int irq)"
.br
.ti -1c
.RI "\fBISR\fP \fBGetISR\fP (int int_numb)"
.br
.ti -1c
.RI "void \fBSetISR\fP (int int_numb, \fBISR\fP isr)"
.br
.ti -1c
.RI "\fBBYTE8\fP \fBGetScanCode\fP (void)"
.br
.ti -1c
.RI "\fBBOOL\fP \fBScanCodeRdy\fP (void)"
.br
.ti -1c
.RI "\fBBOOL\fP \fBSetsKybdState\fP (\fBBYTE8\fP)"
.br
.ti -1c
.RI "\fBWORD16\fP \fBScanCode2Ascii\fP (\fBBYTE8\fP code)"
.br
.ti -1c
.RI "\fBQWORD64\fP \fBCPU_Clock_Cycles\fP (void)"
.br
.ti -1c
.RI "\fBWORD16\fP * \fBCell\fP (int row, int col)"
.br
.ti -1c
.RI "void \fBClearScreen\fP (\fBBYTE8\fP attb)"
.br
.ti -1c
.RI "char * \fBFormatUnsigned\fP (char *bfr, unsigned val, int base, int width, char fill)"
.br
.ti -1c
.RI "int \fBGetCursorCol\fP (void)"
.br
.ti -1c
.RI "int \fBGetCursorRow\fP (void)"
.br
.ti -1c
.RI "void \fBPutAttb\fP (\fBBYTE8\fP attb, int cells)"
.br
.ti -1c
.RI "void \fBPutChar\fP (char ch)"
.br
.ti -1c
.RI "void \fBPutCharAt\fP (char ch, int row, int col)"
.br
.ti -1c
.RI "void \fBPutString\fP (char *string)"
.br
.ti -1c
.RI "void \fBPutUnsigned\fP (unsigned val, int base, int width)"
.br
.ti -1c
.RI "void \fBSetCursorPosition\fP (int row, int col)"
.br
.ti -1c
.RI "void \fBSetCursorVisible\fP (\fBBOOL\fP visible)"
.br
.ti -1c
.RI "char * \fBUnsigned2Ascii\fP (char *bfr, unsigned val, int base)"
.br
.ti -1c
.RI "\fBWINDOW\fP * \fBWindowCreate\fP (char *\fBtitle\fP, int row_first, int row_last, int col_first, int col_last)"
.br
.ti -1c
.RI "void \fBWindowErase\fP (\fBWINDOW\fP *w)"
.br
.ti -1c
.RI "void \fBWindowPutChar\fP (\fBWINDOW\fP *w, char ch)"
.br
.ti -1c
.RI "void \fBWindowPutString\fP (\fBWINDOW\fP *w, char *str)"
.br
.ti -1c
.RI "void \fBWindowSelect\fP (\fBWINDOW\fP *w)"
.br
.ti -1c
.RI "void \fBWindowSetCursor\fP (\fBWINDOW\fP *w, int row, int col)"
.br
.ti -1c
.RI "void * \fBmalloc\fP (long unsigned int)"
.br
.ti -1c
.RI "void \fBfree\fP (void *)"
.br
.ti -1c
.RI "\fBQUEUE\fP * \fBQueueCreate\fP (int numb_items, int item_size)"
.br
.ti -1c
.RI "\fBBOOL\fP \fBQueueInsert\fP (\fBQUEUE\fP *q, void *data)"
.br
.ti -1c
.RI "\fBBOOL\fP \fBQueueRemove\fP (\fBQUEUE\fP *q, void *data)"
.br
.ti -1c
.RI "\fBFIXED32\fP \fBProduct32\fP (\fBFIXED32\fP multiplier, \fBFIXED32\fP multiplicand)"
.br
.ti -1c
.RI "\fBFIXED32\fP \fBQuotient32\fP (\fBFIXED32\fP dividend, \fBFIXED32\fP divisor)"
.br
.ti -1c
.RI "\fBFIXED32\fP \fBInverse32\fP (\fBFIXED32\fP n)"
.br
.ti -1c
.RI "\fBFIXED32\fP \fBSqrt32\fP (\fBFIXED32\fP n)"
.br
.ti -1c
.RI "\fBFIXED64\fP \fBProduct64\fP (\fBFIXED64\fP multiplier, \fBFIXED64\fP multiplicand)"
.br
.in -1c
.SH "Define Documentation"
.PP 
.SS "#define CLI   __asm__ __volatile__ ('CLI')"
.SS "#define ENTER   __asm__ __volatile__ ('ENTER $0,$0')"
.SS "#define ENTRIES(a)   (sizeof(a)/sizeof(a[0]))"
.SS "#define FIXED32_2PI   411775L"
.SS "#define FIXED32_E   178144L"
.SS "#define FIXED32_GOLDEN   106039L"
.SS "#define FIXED32_ONE   65536L"
.SS "#define FIXED32_PI   205887L"
.SS "#define FIXED32_ROOT2   74804L"
.SS "#define FIXED32_ROOT3   113512L"
.SS "#define FLOAT32(x)   ((\fBFIXED32\fP) ((x) << 16))"
.SS "#define IRET   __asm__ __volatile__ ('IRET')"
.SS "#define IRQ_COM1_COM3   4"
.SS "#define IRQ_COM2_COM4   3"
.SS "#define IRQ_FLOPPY   6"
.SS "#define IRQ_HARD_DISK   14"
.SS "#define IRQ_KYBD   1"
.SS "#define IRQ_PAR_PORT   7"
.SS "#define IRQ_PS2_MOUSE   12"
.SS "#define IRQ_RTC   8"
.SS "#define IRQ_TICK   0"
.SS "#define LEAVE   __asm__ __volatile__ ('LEAVE')"
.SS "#define LSB(u)   ((u) & 0xFF)"
.SS "#define MSB(u)   ((u) >> 8)"
.SS "#define NULL   ((void *) 0)"
.SS "#define POPA   __asm__ __volatile__ ('POPAL')"
.SS "#define POPF   __asm__ __volatile__ ('POPFL')"
.SS "#define PRIVATE   static"
.SS "#define PUSHA   __asm__ __volatile__ ('PUSHAL')"
.SS "#define PUSHCS   __asm__ __volatile__ ('PUSHL %CS') ;"
.SS "#define PUSHF   __asm__ __volatile__ ('PUSHFL')"
.SS "#define ROUND32(x)   ((int) (((x) + 0x8000) >> 16))"
.SS "#define STI   __asm__ __volatile__ ('STI')"
.SS "#define TRUNC32(x)   ((int) ((x) >> 16))"
.SH "Typedef Documentation"
.PP 
.SS "typedef int \fBBOOL\fP"
.SS "typedef unsigned char \fBBYTE8\fP"
.SS "typedef unsigned long int \fBDWORD32\fP"
.SS "typedef signed long int \fBFIXED32\fP"
.SS "typedef signed long long int \fBFIXED64\fP"
.SS "typedef void(* \fBISR\fP)(void)"
.SS "typedef unsigned long long int \fBQWORD64\fP"
.SS "typedef unsigned short int \fBWORD16\fP"
.SH "Function Documentation"
.PP 
.SS "\fBWORD16\fP* Cell (int row, int col)"
.SS "void ClearScreen (\fBBYTE8\fP attb)"
.SS "\fBQWORD64\fP CPU_Clock_Cycles (void)"
.SS "void exit (int)"
.SS "char* FormatUnsigned (char * bfr, unsigned val, int base, int width, char fill)"
.SS "void free (void *)"
.SS "int GetCursorCol (void)"
.SS "int GetCursorRow (void)"
.SS "\fBISR\fP GetISR (int int_numb)"
.SS "\fBBYTE8\fP GetScanCode (void)"
.SS "\fBBYTE8\fP inportb (\fBWORD16\fP)"
.SS "\fBFIXED32\fP Inverse32 (\fBFIXED32\fP n)"
.SS "int IRQ2INT (int irq)"
.SS "void* LastMemoryAddress (void)"
.SS "void* malloc (long unsigned int)"
.SS "void outportb (\fBWORD16\fP, \fBBYTE8\fP)"
.SS "\fBFIXED32\fP Product32 (\fBFIXED32\fP multiplier, \fBFIXED32\fP multiplicand)"
.SS "\fBFIXED64\fP Product64 (\fBFIXED64\fP multiplier, \fBFIXED64\fP multiplicand)"
.SS "void PutAttb (\fBBYTE8\fP attb, int cells)"
.SS "void PutChar (char ch)"
.SS "void PutCharAt (char ch, int row, int col)"
.SS "void PutString (char * string)"
.SS "void PutUnsigned (unsigned val, int base, int width)"
.SS "\fBQUEUE\fP* QueueCreate (int numb_items, int item_size)"
.SS "\fBBOOL\fP QueueInsert (\fBQUEUE\fP * q, void * data)"
.SS "\fBBOOL\fP QueueRemove (\fBQUEUE\fP * q, void * data)"
.SS "\fBFIXED32\fP Quotient32 (\fBFIXED32\fP dividend, \fBFIXED32\fP divisor)"
.SS "\fBWORD16\fP ScanCode2Ascii (\fBBYTE8\fP code)"
.SS "\fBBOOL\fP ScanCodeRdy (void)"
.SS "void SetCursorPosition (int row, int col)"
.SS "void SetCursorVisible (\fBBOOL\fP visible)"
.SS "void SetISR (int int_numb, \fBISR\fP isr)"
.SS "\fBBOOL\fP SetsKybdState (\fBBYTE8\fP)"
.SS "\fBFIXED32\fP Sqrt32 (\fBFIXED32\fP n)"
.SS "char* Unsigned2Ascii (char * bfr, unsigned val, int base)"
.SS "\fBWINDOW\fP* WindowCreate (char * title, int row_first, int row_last, int col_first, int col_last)"
.SS "void WindowErase (\fBWINDOW\fP * w)"
.SS "void WindowPutChar (\fBWINDOW\fP * w, char ch)"
.SS "void WindowPutString (\fBWINDOW\fP * w, char * str)"
.SS "void WindowSelect (\fBWINDOW\fP * w)"
.SS "void WindowSetCursor (\fBWINDOW\fP * w, int row, int col)"
.SH "Author"
.PP 
Generated automatically by Doxygen for Colision from the source code.
